package com.allwees.bs.c.module.user.repository;

import com.allwees.bs.c.module.user.entity.RetrievePasswdEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface RetrievePasswdRepository extends JpaRepository<RetrievePasswdEntity, Integer>{

	@Query(value="select * from  usr_retrieve_passwd where user_email=?1 order by created_at desc limit 1" ,nativeQuery=true)
	RetrievePasswdEntity findByUserEmail(String email);

	List<RetrievePasswdEntity> findAllByUserUuid(String userUuid);
}
